From: Richard M. Stallman Date: Mon, 23 May 1994 08:23:03 +0000 (+0000) Subject: (Buffer-menu-mouse-select): Handle dedicated window. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~91403 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=d953b88c3599ec6c66856f0749a5d5dac006d2f0;p=emacs.git (Buffer-menu-mouse-select): Handle dedicated window. --- diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 3c55bdb4d3c..a2f67bf59f3 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -346,7 +346,10 @@ You can mark buffers with the \\\\[Buffer-menu-mark] comma (goto-char (posn-point (event-end event))) (setq buffer (Buffer-menu-buffer t)))) (select-window (posn-window (event-end event))) - (switch-to-buffer buffer))) + (if (and (window-dedicated-p (selected-window)) + (eq (selected-window) (frame-root-window))) + (switch-to-buffer-other-frame buffer) + (switch-to-buffer buffer)))) (defun Buffer-menu-this-window () "Select this line's buffer in this window."